package com.niiwoo.civet.trade.dto.request.loan;

import com.niiwoo.civet.trade.enums.LoanSubmitTypeEnum;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @Author: wuke
 * @Description:
 * @Date: Created in 17:40 2018/4/13
 */
@Data
public class LoanAuditConfirmReqDTO implements Serializable {
    private static final long serialVersionUID = -6423935940042042249L;

    @NotNull(message = "用户ID不能为空")
    private String userId;

    @NotNull(message = "标的ID不能为空")
    private Long projectId;

    @NotNull(message = "借款金额不能为空")
    @DecimalMin(value="0",message = "借款金额不能小于0")
    private BigDecimal loanAmount;

    @NotNull(message = "借款期限不能为空")
    private Integer deadline;

    // 使用红包Id
    private Long prizeId;

    // 使用红包类型
    private Byte prizeType;

    @NotNull(message = "借款提交类型不能为空")
    private LoanSubmitTypeEnum loanSubmitTypeEnum;
}
